/-boot ...
BootController.ts
BootLayout.ts
StorageLoader.ts
boot.ts
/-docs
/-editor
CodeMirrorEditor.ts
CompletionCodeMirrorEditor.ts
CssEditorType.ts
Editor.ts
EditorType.ts
HtmlEditorType.ts
JavaScriptEditorType.ts
TypeScriptEditorType.ts
x-last-PlainTextEditorType.ts
/-files
/-files-old
/-imports
/-layout
/-storage
/-tests
/-typings
Dom.ts
TypeScriptService.ts
functions.ts
ko.ts
nteapo.html
persistence.api.ts
persistence.ts
shell.ts
teapo.html
teapo.ts
try.html
try.js
xxxxxxxxxx
    static migrateProgressAmount = 0.3;
 
128
      this._layout.setSmallProgressText(
129
        'Loading files from ' +
130
        (loadingFromPersistence ? persistenceName : 'dom' + (persistenceName ? ' (' + persistenceName + ')' : '')) +
131
        (editedUTC ? ' edited on ' + new Date(editedUTC) : '') +
132
        '...');
133
    }
134
135
    private _storageLoadProgress(
136
      totalFileCount: number,
137
      loadedFileCount: number,
138
      lastLoadedFileName: string) {
139
140
      this._layout.setProgressColor('green');
141
      this._layout.setSmallProgressText('Loading "' + lastLoadedFileName + '" ' + loadedFileCount + ' of ' + totalFileCount + '...');
142
      this._layout.setProgressRatio(
143
        BootController.initialProgress + BootController.domLoadProgressAmount +
144
        BootController.migrateProgressAmount * loadedFileCount / totalFileCount);
145
      this._fileCount = loadedFileCount;
146
    }
147
148
    private _storageLoaded(
149
      err: Error,
150
      byFullPath: { [fullPath: string]: { [property: string]: string; }; },
151
      domUpdater: storage.attached.UpdateStorage,
152
      persistenceUpdater: storage.attached.UpdateStorage) {
153
      if (err) {
154
        alert('Loading ' + err.message);
155
        return;
156
      }
157
158
      this._layout.setProgressColor('black');
159
      this._layout.setSmallProgressText(
160
        'Loaded ' + this._fileCount + ' files from ' +
161
        (this._loadingFromPersistence ? this._persistenceName : 'dom' + (this._persistenceName ? ' (' + this._persistenceName + ')' : '')) +
162
        (this._editedUTC ? ' edited on ' + new Date(this._editedUTC) : '') + '.');
163
      this._layout.setProgressRatio(
164
        BootController.initialProgress + BootController.domLoadProgressAmount +
165
        BootController.migrateProgressAmount);
166
      
167
      addEventListener(window, 'keydown', (evt: KeyboardEvent) => {
168
        if (evt.keyCode === 83 && evt.ctrlKey) {
169
          saveCurrentHtmlAsIs();
170
          if (evt.preventDefault) evt.preventDefault();
171
          if ('cancelBubble' in evt) evt.cancelBubble = true;
172
        }
173
      });
174
    }
175
176
    private _getUniqueKey() {
177
      var key = window.location.pathname;
178
179
      key = key.split('?')[0];
180
      key = key.split('#')[0];
181
182
      key = key.toLowerCase();
183
184
      var ignoreSuffix = '/index.html';
185
186
      if (key.length > ignoreSuffix.length && key.slice(key.length - ignoreSuffix.length) === ignoreSuffix)
187
        key = key.slice(0, key.length - ignoreSuffix.length);
188
189
      key += '*';
190
191
      return key;
192
    }
193
194
  }
195
196
}
164:44 property number setProgressRatio(ratio: number): void